package ace.module.captcha.sms.core.impl.dao.entity;

import ace.cmp.spring.data.jdbc.querydsl.core.annotations.LogicDelete;
import ace.cmp.spring.graphql.core.model.GenericPageContent;
import ace.module.captcha.sms.api.model.dto.CaptchaSmsApplicationExtendDto;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.annotation.Nullable;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.annotation.Version;
import org.springframework.data.relational.core.mapping.Table;

/**
 * 短信验证码应用扩展.
 *
 * @author Caspar
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(title = CaptchaSmsApplicationExtendDto.TABLE_DESC)
@Table(CaptchaSmsApplicationExtendDto.TABLE_NAME)
public class CaptchaSmsApplicationExtend implements Serializable, GenericPageContent<Long> {

  @Id
  @Schema(title = CaptchaSmsApplicationExtendDto.ID_TITLE, description = CaptchaSmsApplicationExtendDto.ID_DESC)
  private Long id;

  /**
   * {@link CaptchaSmsApplication#getId()}
   */
  @Schema(title = CaptchaSmsApplicationExtendDto.CAPTCHA_SMS_APP_ID_TITLE, description = CaptchaSmsApplicationExtendDto.CAPTCHA_SMS_APP_ID_DESC)
  private Long captchaSmsAppId;

  /**
   * {@link CaptchaSmsItemConfig#getId()}
   */
  @Nullable
  @Schema(title = CaptchaSmsApplicationExtendDto.CAPTCHA_SMS_ITEM_CONFIG_ID_TITLE, description = CaptchaSmsApplicationExtendDto.CAPTCHA_SMS_ITEM_CONFIG_ID_DESC)
  private Long captchaSmsItemConfigId;

  /**
   * {@link ace.module.sms.api.model.dto.SmsApplicationDto}
   */
  @Nullable
  @Schema(title = CaptchaSmsApplicationExtendDto.SMS_APP_ID_TITLE, description = CaptchaSmsApplicationExtendDto.SMS_APP_ID_DESC)
  private Long smsAppId;

  @LogicDelete
  @Schema(title = CaptchaSmsApplicationExtendDto.DELETE_FLAG_TITLE, description = CaptchaSmsApplicationExtendDto.DELETE_FLAG_DESC)
  private Long deleteFlag;

  @CreatedDate
  @Schema(title = CaptchaSmsApplicationExtendDto.CREATE_TIME_TITLE, description = CaptchaSmsApplicationExtendDto.CREATE_TIME_DESC)
  private Long createTime;

  @LastModifiedDate
  @Schema(title = CaptchaSmsApplicationExtendDto.UPDATE_TIME_TITLE, description = CaptchaSmsApplicationExtendDto.UPDATE_TIME_DESC)
  private Long updateTime;

  @Version
  @Schema(title = CaptchaSmsApplicationExtendDto.ROW_VERSION_TITLE, description = CaptchaSmsApplicationExtendDto.ROW_VERSION_DESC)
  private Long rowVersion;

}
